package com.zmn.oms.third.eliao;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.stereotype.Component;

/**
 * 12729易聊渠道常量定义类
 *
 * @author xiewenbing
 * @date 2020/11/20
 */
@Component
public class EasyLiaoConsts {

    /**
     * 渠道名称
     */
    public final static String CHANNEL_NAME = "12729易聊";

    /**
     * 渠道对接开关
     */
    public static boolean POWER_ON = false;

    /**
     * 录入标志
     */
    public static String CREATE_ORDER_REMARK = "录入";

    /**
     * 公司id
     */
    public final static int COMPANY_ID = 12729;

    /**
     * 渠道id，临时用
     */
    public final static int CHANNEL_ID = 12729;

    /**
     * 超区消息id
     */
    public static Integer OUT_SERVICE_MESSAGE_RULE_ID = 10361;

    /**
     * 服务开关配置
      * @param powerOn
     */
    @NacosValue(value="${eliao.api.powerOn:false}",autoRefreshed = true)
    public void setPowerOn(boolean powerOn) {
        POWER_ON = powerOn;
    }

    /**
     * 备注设置
     * @param remark
     */
    @NacosValue(value="${eliao.api.remark:录入}",autoRefreshed = true)
    public void setRemark(String remark) {
        CREATE_ORDER_REMARK = remark;
    }

    /**
     * 超区消息id设置
     * @param ruleId
     */
    @NacosValue(value="${eliao.api.message.id:10361}",autoRefreshed = true)
    public void setMessageRuleId(Integer ruleId) {
        OUT_SERVICE_MESSAGE_RULE_ID = ruleId;
    }
}
